import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hive/hive.dart';
import 'package:path_provider/path_provider.dart';

import 'routes.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  final dir = await getApplicationDocumentsDirectory();
  Hive.defaultDirectory = dir.path;
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      popGesture: true,
          debugShowCheckedModeBanner: false,
          initialRoute: '/',
          unknownRoute: routeTable[0],
          defaultTransition: Transition.cupertino,
          transitionDuration: const Duration(milliseconds: 200),
          getPages: routeTable,
          navigatorObservers: <NavigatorObserver>[
            GetObserver(),
          ],
    );
  }
}
